class ExaminationType < ActiveRecord::Base

   hobo_model # Don't put anything above this

  fields do
    name  :string, :unique
    body  :text
    timestamps
  end

  has_many :order_examinations
  
  has_and_belongs_to_many  :parameter_norms


  # --- Validation --- #
  validates_presence_of :name, :body


  # --- Permissions --- #

  def create_permitted?
    acting_user.administrator?
  end

  def update_permitted?
    acting_user.administrator?
  end

  def destroy_permitted?
    acting_user.administrator?
  end

  def view_permitted?(field)
    true
  end
end
